<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>语言包管理</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/bootstrap-icons.css" rel="stylesheet">
    <style>
    :root {
      --section-header-bg: #f5f5f5;
      --section-header-color: #222;
    }
    body.theme-white {
      --section-header-bg: #f5f5f5;
      --section-header-color: #222;
    }
    body.theme-gray {
      --section-header-bg: #e0e0e0;
      --section-header-color: #333;
    }
    body.theme-blue {
      --section-header-bg: #1976d2;
      --section-header-color: #fff;
    }
    body.theme-red {
      --section-header-bg: #c62828;
      --section-header-color: #fff;
    }
    body, .card, .card-body {
      background: #fff !important;
      color: #212529 !important;
    }
    .section-header, .card-header.section-header {
      background: var(--section-header-bg) !important;
      color: var(--section-header-color) !important;
      font-weight: bold;
      font-size: 1.2rem;
      border-radius: 6px 6px 0 0;
      border-bottom: 1px solid #e0e0e0;
    }
    </style>
</head>
<body>
    <div class="container-fluid mt-4" style="padding: 24px; margin-top: 40px;">
        <h3 class="mb-4">语言包管理</h3>
        <div th:replace="admin/translate/content-items :: contentItems">
            <div class="search-form mb-4">
                <form id="searchForm">
                    <div class="row g-3 mb-2">
                        <div class="col-md-4">
                            <input type="text" class="form-control" id="itemKey" placeholder="语言包Key">
                        </div>
                        <div class="col-md-4">
                            <input type="text" class="form-control" id="fromTable" placeholder="业务表名">
                        </div>
                        <div class="col-md-4">
                            <input type="text" class="form-control" id="fromField" placeholder="字段名">
                        </div>
                    </div>
                    <div class="row g-3 align-items-center">
                        <div class="col-md-4">
                            <input type="text" class="form-control" id="fromDataId" placeholder="数据ID">
                        </div>
                        <div class="col-md-4">
                            <input type="text" class="form-control" id="memo" placeholder="备注">
                        </div>
                        <div class="col-md-4 d-flex gap-2 justify-content-end">
                            <button type="submit" class="btn btn-primary">搜索</button>
                            <button type="reset" class="btn btn-secondary">重置</button>
                            <button type="button" class="btn btn-success" onclick="showAddModal()">
                                <i class="bi bi-plus"></i> 新增语言包
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="dropdown" style="position: fixed; top: 16px; right: 24px; z-index: 9999;">
      <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown">
        切换主题
      </button>
      <ul class="dropdown-menu dropdown-menu-end">
        <li><a class="dropdown-item" href="#" onclick="setTheme('white')">白色</a></li>
        <li><a class="dropdown-item" href="#" onclick="setTheme('gray')">灰色</a></li>
        <li><a class="dropdown-item" href="#" onclick="setTheme('blue')">蓝色</a></li>
        <li><a class="dropdown-item" href="#" onclick="setTheme('red')">红色</a></li>
      </ul>
    </div>
    <script>
    function setTheme(theme) {
      document.body.className = document.body.className.replace(/theme-\w+/g, '');
      document.body.classList.add('theme-' + theme);
      localStorage.setItem('theme', theme);
    }
    document.addEventListener('DOMContentLoaded', function() {
      const theme = localStorage.getItem('theme') || 'white';
      setTheme(theme);
    });
    </script>
</body>
</html> 